package com.shumm.mapper;

import com.shumm.po.Traditionalchinesemedicine;
import com.shumm.vo.TcmAndTcmrVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shumm
 * @Description
 * @create 2023-11-28 15:21
 */
@Mapper
public interface TraditionalchinesemedicineMapper {

    Traditionalchinesemedicine selectById(@Param("id") int id);

    List<Traditionalchinesemedicine> selectAll();

    int addAndGetId(@Param("tcm") Traditionalchinesemedicine tcm);

    int deleteById(@Param("id") int id);

    int deleteByIdWithForeign(@Param("id") int id);

    int update(@Param("tcm") Traditionalchinesemedicine tcm);

    int isExistedById(@Param("id") int id);

    List<Traditionalchinesemedicine> selectByCondition(@Param("name") String name, @Param("alias") String alias, @Param("xingwei") String xingwei, @Param("zhuzhi") String zhuzhi);

    int countByName(@Param("name") String name);

    List<TcmAndTcmrVO> selectByIdWithContent(@Param("id") int id);
}
